//
//  RegitsterEmailRequest.m
//  DYLYJ
//
//  Created by JM on 15/11/21.
//  Copyright © 2015年 JM. All rights reserved.
//

#import "RegitsterEmailRequest.h"

@implementation RegitsterEmailRequest
- (void)didRealRequest {
    [[XPGWifiSDK sharedInstance] registerUserByEmail:self.DY_userName password:self.DY_password];
}

- (void)XPGWifiSDK:(XPGWifiSDK *)wifiSDK didRegisterUser:(NSNumber *)error errorMessage:(NSString *)errorMessage uid:(NSString *)uid token: (NSString *)token {
    if(error.integerValue == XPGWifiError_NONE) {
        RegitsterEmailResponse* response = [RegitsterEmailResponse response];
        response.DY_wifiSDK = wifiSDK;
        response.DY_uid = uid;
        response.DY_token = token;
        self.block(response,nil);
        
    }
    else
    {
        self.block(nil,[NSError dy_errorWithErrCode:error.integerValue errMessage:errorMessage]);
    }
    [super superHandelResponse];
}

@end

@implementation RegitsterEmailResponse


@end

